exports.main = async (ctx) => {
    try {
        let obj = await bind(ctx);
        return obj;
    } catch (err) {
        return err;
    }
};

//小程序投放-商品绑定/解绑
let bind = async (ctx) => {
    const { cloud } = ctx;
    try {
        const result = await cloud.topApi.invoke({
            api: 'taobao.miniapp.distribution.items.bind',
            autoSession: true,
            data: {
                target_entity_list: '625856937987,626168466079',
                url: 'https://m.duanqu.com?_ariver_appid=3000000002173871&_mp_code=tb&transition=present',
                add_bind: true,
            }
        });
        return result;
    } catch (err) {
        return err
    }
}